<?php echo "<h1>".$this->escape($this->title)."</h1>";?>
 <table>
  <tr>
      <th>id</th>
      <th>Login</th>
      <th>Plec</th>
      <th>Email</th>
      <th>Typ konta</th>
      <th>&nbsp;</th>
 </tr>
 <?php foreach($this->user as $user) : ?>
 <?php $db = Zend_Db_Table::getDefaultAdapter();
        $query = $db->select()
                ->from('acctype', 'type')
                ->where('idacctype = ?', $user->idacctype);
        $result = $db->fetchRow($query);

        $user->idacctype = $result['type'];?>
 <tr>
     <td><?php echo $this->escape($user->iduser);?></td>
     <td><?php echo $this->escape($user->login);?></td>
     <td><?php echo $this->escape($user->gender);?></td>
     <td><?php echo $this->escape($user->email);?></td>
     <td><?php echo $this->escape($user->idacctype);?></td>
     <td>
         <a href="<?php echo $this->url(array('controller'=>'zalogowani', 
             'action'=>'adminedytujkonto', 'iduser'=>$user->iduser));?>">Edit</a>
         <a href="<?php echo $this->url(array('controller'=>'zalogowani', 
             'action'=>'usunusera', 'iduser'=>$user->iduser));?>">Delete</a>
         <a href="<?php echo $this->url(array('controller'=>'zalogowani', 
             'action'=>'adminlistaulubionych', 'iduser'=>$user->iduser));?>">Lista</a>
     </td>
 </tr>
 <?php endforeach; ?>
 </table>

